package xiangmu;

import java.util.HashSet;

public class Set {
    public static void main(String[] args) {
        HashSet<String> set1 = new HashSet<String>();
        HashSet<String> set2= new HashSet<String>();
        set1.add("a");
        set1.add("b");
        set1.add("c");
        set1.add("d");
        set1.add("e");
        set2.add("x");
        set2.add("y");
        System.out.println(set1.size());
        set1.remove("a");
        System.out.println("set1 "+set1);
        System.out.println("set2 "+set2);

        set1.addAll(set2);
        System.out.println(set1);

        for (String s : set1) {
            System.out.println(s);
        }
    }

}
